#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int print(n)
{
	
	
	if (n >= 10)
		 print(n / 10);
	printf("%d ", n%10);
}
int main()
{
	int m;
	scanf("%d", &m);
	print(m);

	return 0;
}